/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Dao;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author gustavo
 */
public class GenericDao {

    protected Connection conexao() {
        Connection conn = null;
        try {
        	Class.forName("org.postgresql.Driver");		
            String url = "jdbc:postgresql://localhost:5432/unisul_cobranca";
            conn = DriverManager.getConnection(url, "postgres", "123456");

        } catch (Exception e) {
            System.out.println("Nao foi possivel se conectar ao banco de dados!");
            throw new RuntimeException();
        }
        return conn;
    }
}